
template <class Name, class Name2>
class color_writer {
public:

	color_writer(Name _name, Name2 _name2) : name(_name), name2(_name2) {
		COLOR_UPGRADER = 12567;
	}

	template <class VertexOrEdge>
	void operator()(std::ostream& out, const VertexOrEdge& v) const {
		int color = name.at(v) * COLOR_UPGRADER;
		out << "[label=\"" << name2.at(v) << ", c" << name.at(v) << "\",style = filled, color=\"#" << color << "\"]";
	}

private:
	/**
	COLOR_UPGRADER - constant needed for converting color number to appropriate for human eyes
	*/
	int COLOR_UPGRADER;
	Name name;
	Name2 name2;
};
